<!-- 父级路由组件，有两个子路由组件News，Message。相当于导航栏里卖弄有一个内容区，导航栏切换到Home组件后又有一个导航栏可以切换选择News组件或者Messagezujain1 -->
<template>
	<div>
		<h2>Home组件内容</h2>
		<div>
			<ul class="nav nav-tabs">
				<li>
					<!-- 2、注意路径是/home/news，带着父路径 ,了，路径在index.js里面配置-->
					<router-link class="list-group-item" active-class="active" to="/home/news">News</router-link>
				</li>
				<li>
					<!-- 2、to用于路由跳转 -->
					<router-link class="list-group-item" active-class="active" to="/home/message">Message</router-link>
				</li>
			</ul>
			<!-- 3、展示路由组件。类似于插槽 -->
			<router-view></router-view>
		</div>
	</div>
</template>

<script>
	export default {
		name:'Home',
		/* beforeDestroy() {
			console.log('Home组件即将被销毁了')
		}, */
		/* mounted() {
			console.log('Home组件挂载完毕了',this)
			window.homeRoute = this.$route
			window.homeRouter = this.$router
		},  */
	}
</script>